$().ready(function(e){
	$("#contentComment").live('keydown',function(e){
		if(e.keyCode == 13){
			var token = $(this).attr('token');
			var action = $("#frm"+token).attr('action');
			var _this = $(this);
			console.log(action)
			$.ajax({
				url		: action,
				type	: 'POST',
				datatype: 'json',
				data	: '&content=' + _this.val()+'&object_id='+_this.attr('object_id'),
				success	: function(res){
					$(".commentSelector").prepend(res);
					// if($(".commentSelector .comment-item").length == 1) $("#numberComment").html($(".commentSelector .comment-item").length + " comment");
					// else $("#numberComment").html($(".commentSelector .comment-item").length + " comments");
					_this.val('');
				},
			});
		}
	});
});